﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BoriPeter.FitnessJournal8.Models
{
    public enum FoodCategoryType
    {
        All,
        History,
        Favorite
    }
    public class FoodCategory : ModelBase
    {
        #region Label
        private string label;
        public string Label
        {
            get
            {
                return this.label;
            }

            set
            {
                this.label = value;
                NotifyOfPropertyChange("Label");
            }
        }
        #endregion

        #region Name
        private string name;
        public string Name
        {
            get
            {
                return this.name;
            }

            set
            {
                this.name = value;
                NotifyOfPropertyChange("Name");
            }
        }
        #endregion

        #region FoodCategoryType
        private FoodCategoryType foodCategoryType;
        public FoodCategoryType FoodCategoryType
        {
            get
            {
                return this.foodCategoryType;
            }

            set
            {
                this.foodCategoryType = value;
                NotifyOfPropertyChange("FoodCategoryType");
            }
        }
        #endregion

        public FoodCategory(string _label, string _name, FoodCategoryType _type)
            : base()
        {
            label = _label;
            name = _name;
            foodCategoryType = _type;
        }

        private static List<FoodCategory> defaultList;
        public static List<FoodCategory> DefaultList
        {
            get
            {
                if (defaultList == null)
                {
                    defaultList = new List<FoodCategory>();
                    defaultList.Add(new FoodCategory("All", "all", FoodCategoryType.All));
                    defaultList.Add(new FoodCategory("History", "history", FoodCategoryType.History));
                    defaultList.Add(new FoodCategory("Favorite", "favorite",FoodCategoryType.Favorite));
                }
                return defaultList;
            }
        }
    }
}
